<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>修改密码</title>
	<%@ include file="../../include/head.jsp"%>
</head>
<body>
<div class="admin-content">
	<div class="am-g">
		<div class="am-u-sm-12">
			<form class="am-form am-form-horizontal" data-am-validator action="${ctx}/user/changePassword" method="post">
				<div class="am-form-group">
					<label class="am-u-sm-3 am-form-label">原密码：</label>
					<div class="am-u-sm-8">
						<input type="password" name="password" placeholder="原密码" required />
					</div>
					<label class="am-u-sm-1"></label>
				</div>
				<div class="am-form-group">
					<label class="am-u-sm-3 am-form-label">新密码：</label>
					<div class="am-u-sm-8">
						<input type="password" name="newPassword" placeholder="新密码" required />
					</div>
					<label class="am-u-sm-1"></label>
				</div>
				<div class="am-form-group">
					<div class="am-u-sm-9 am-u-sm-push-3">
						<button type="submit" class="am-btn am-btn-primary">确认修改</button>
					</div>
				</div>
			</form>
		</div>
	</div>
</div>
<%@ include file="../../include/bottom.jsp"%>
<script type="text/javascript">
	$(document).ready(function() {
		var msg = '${msg}';
		if(msg!=''){
			if(msg=="修改密码成功"){
				layer.confirm('修改密码成功，请重新登录',{offset: '55px',shade:0.001,closeBtn:0,btn: ['确定']},function(index, layero){
					layer.close(index);
					top.location.href = "${ctx}/logout";
				});
			}else{
				iuAlert("修改密码失败");
			}
		}
	});
</script>
</body>
</html>